import { DEFAULT_LAYOUT } from '../base';
import { AppRouteRecordRaw } from '../types';

// 库存管理
const INVENTORY_MANAGEMENT: AppRouteRecordRaw = {
  path: '/inventory-management',
  name: '库存管理',
  component: DEFAULT_LAYOUT,
  meta: {
    locale: 'menu.inventory-management',
    requiresAuth: true,
    ignoreCache: false,
    icon: 'icon-storage',
    roles: ['*'],
    order: 4,
  },
  children: [
    // 入库
    {
      path: '/flow-query',
      name: '入库查询',
      component: () =>
        import('@/views/inventory-management/list/flow-query/index.vue'),
      meta: {
        locale: 'menu.flowQuery',
        requiresAuth: true,
        ignoreCache: false,
        roles: ['*'],
      },
    },
    // 退库
    {
      path: '/stock-return-query',
      name: '退库查询',
      component: () =>
        import(
          '@/views/inventory-management/list/stock-return-query/index.vue'
        ),
      meta: {
        locale: 'menu.stockReturnQuery',
        requiresAuth: true,
        ignoreCache: false,
        roles: ['*'],
      },
    },
    // 库存台账
    {
      path: '/inventory-query',
      name: '库存台账查询',
      component: () =>
        import('@/views/inventory-management/list/inventory-query/index.vue'),
      meta: {
        locale: 'menu.inventoryQuery',
        requiresAuth: true,
        ignoreCache: false,
        roles: ['*'],
      },
    },
    // 交接
    {
      path: '/handover-query',
      name: '交接查询',
      component: () =>
        import('@/views/inventory-management/list/handover-query/index.vue'),
      meta: {
        locale: 'menu.handoverQuery',
        requiresAuth: true,
        ignoreCache: false,
        roles: ['*'],
      },
    },
    {
      path: '/inventory-summary',
      name: '实时库存汇总',
      component: () =>
        import('@/views/inventory-management/list/inventory-summary/index.vue'),
      meta: {
        locale: 'menu.inventorySummary',
        requiresAuth: true,
        ignoreCache: false,
        roles: ['*'],
      },
    },
    // 托盘信息
    {
      path: '/tray-info',
      name: '托盘信息查询',
      component: () =>
        import('@/views/inventory-management/list/tray-info/index.vue'),
      meta: {
        locale: 'menu.trayInfo',
        requiresAuth: true,
        ignoreCache: false,
        roles: ['*'],
      },
    },
    // 配送
    {
      path: '/delivery-query',
      name: '配送查询',
      component: () =>
        import('@/views/inventory-management/list/delivery-query/index.vue'),
      meta: {
        locale: 'menu.deliveryQuery',
        requiresAuth: true,
        ignoreCache: false,
        roles: ['*'],
      },
    },
    // 库存架次
    {
      path: '/inventory-lot-noquery',
      name: '库存架次查询',
      component: () =>
        import(
          '@/views/inventory-management/list/inventory-lot-noquery/index.vue'
        ),
      meta: {
        locale: 'menu.inventoryLotNoQuery',
        requiresAuth: true,
        ignoreCache: false,
        roles: ['*'],
      },
    },
    // ERP出库叫箱
    {
      path: '/erp-outbill',
      name: 'ERP出库叫箱',
      component: () =>
        import('@/views/inventory-management/list/erp-outbill/index.vue'),
      meta: {
        locale: 'menu.erpOutBill',
        requiresAuth: true,
        ignoreCache: false,
        roles: ['*'],
      },
    },
    // 出入库流水
    {
      path: '/outinflow-query',
      name: '出入库流水查询',
      component: () =>
        import('@/views/inventory-management/list/outlnflow-query/index.vue'),
      meta: {
        locale: 'menu.outInFlowQuery',
        requiresAuth: true,
        ignoreCache: false,
        roles: ['*'],
      },
    },
    // 配套信息
    {
      path: '/sort-delivery-query',
      name: '配套信息查询',
      component: () =>
        import(
          '@/views/inventory-management/list/sort-delivery-query/index.vue'
        ),
      meta: {
        locale: 'menu.sortDeliveryQuery',
        requiresAuth: true,
        ignoreCache: false,
        roles: ['*'],
      },
    },
    {
      path: '/large-inventory-query',
      name: '大件库存查询',
      component: () =>
        import(
          '@/views/inventory-management/list/large-inventory-query/index.vue'
        ),
      meta: {
        locale: 'menu.largeInventoryQuery',
        requiresAuth: true,
        ignoreCache: false,
        roles: ['*'],
      },
    },
  ],
};

export default INVENTORY_MANAGEMENT;
